package com.party.core.model.partner;

import com.party.core.model.BaseModel;

/**
 * @Description: 合作商附属信息表
 * @Author: yangshoukun
 * @Date: 2018/7/3 13:50
 */
public class MemberPartner extends BaseModel {
    private static final long serialVersionUID = 7703124874930178813L;
    // 合作商的用户id
    private String memberId;
    // 合作商类型, 0: 系统客户, 1: 大客户, 2：地接客户  3：运营客户 4：注册客户
    private Integer partnerType;
    //合作商备注
    private String partnerRemark;
    //当前系统类型 1：社群/2：众筹（用于支付回调判断"系统到期时间"是否累加）
    private Integer systemType;


    // 系统客户
    public static final Integer PARTNER_TYPE_DEFAULT = 0;
    // 大客户
    public static final Integer PARTNER_TYPE_BIG_CUSTOMER = 1;
    // 地接客户
    public static final Integer PARTNER_TYPE_DIJIE_CUSTOMER = 2;
    // 运营客户
    public static final Integer PARTNER_TYPE_YUNYING_CUSTOMER = 3;
    // 注册客户
    public static final Integer PARTNER_TYPE_REGISTER = 4;

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public Integer getPartnerType() {
        return partnerType;
    }

    public void setPartnerType(Integer partnerType) {
        this.partnerType = partnerType;
    }

    public String getPartnerRemark() {
        return partnerRemark;
    }

    public void setPartnerRemark(String partnerRemark) {
        this.partnerRemark = partnerRemark;
    }

    public Integer getSystemType() {
        return systemType;
    }

    public void setSystemType(Integer systemType) {
        this.systemType = systemType;
    }


    @Override
    public String toString() {
        return "MemberPartner{" +
                "memberId='" + memberId + '\'' +
                ", partnerType=" + partnerType +
                ", partnerRemark='" + partnerRemark + '\'' +
                ", systemType=" + systemType +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MemberPartner)) return false;
        if (!super.equals(o)) return false;

        MemberPartner that = (MemberPartner) o;

        if (memberId != null ? !memberId.equals(that.memberId) : that.memberId != null) return false;
        return partnerType != null ? partnerType.equals(that.partnerType) : that.partnerType == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (memberId != null ? memberId.hashCode() : 0);
        result = 31 * result + (partnerType != null ? partnerType.hashCode() : 0);
        result = 31 * result + (partnerRemark != null ? partnerRemark.hashCode() : 0);
        return result;
    }
}
